package testutil

import (
	"testing"

	"xagent/internal/config"
)

// TestContext represents a test context
type TestContext struct {
	T      *testing.T
	Config *config.Config
}

// NewTestContext creates a new test context
func NewTestContext(t *testing.T) *TestContext {
	return &TestContext{
		T: t,
		Config: &config.Config{
			System: &config.SystemConfig{
				MaxConcurrentTasks: 10,
				MaxMemoryUsage:     "1GB",
				MaxCPUUsage:        80,
				LogLevel:           "info",
				LogFile:            "xagent.log",
				WorkspaceDir:       "workspace",
				NumEngineers:       3,
			},
			AI: &config.AIConfig{
				Model:       "gpt-4",
				Temperature: 0.7,
				MaxTokens:   2000,
				Timeout:     30,
				Provider:    "openai",
			},
			Team: &config.TeamConfig{
				MaxAgents:    10,
				MaxTeams:     5,
				DefaultRoles: []string{"planner", "coder", "reviewer"},
			},
			Server: &config.ServerConfig{
				Host: "localhost",
				Port: 8080,
			},
			Actor: &config.ActorConfig{
				MaxConcurrent: 10,
				BatchSize:     100,
				QueueSize:     1000,
			},
			Resource: &config.ResourceConfig{
				MaxCPU:    0.8,
				MaxMemory: 0.8,
				MaxTasks:  100,
			},
			Monitoring: &config.MonitoringConfig{
				Enabled: true,
			},
		},
	}
}
